package ch1;

public class Calc3 {

	public static void main(String[] args) {
		// ++,--在变量的左边和右边的区别
		// 在右边，先执行操作，再自加
		// 在左边：先执行自加，再操作
		int a = 15, b = 15;
		a++;
		++b;
		System.out.println("a=" + a + ",b=" + b);
		int c = a++;
		System.out.println("c=" + c + ",a=" + a);
		c = ++b;
		System.out.println("c=" + c + ",b=" + b);
		c *= a;// c=c*a;
		System.out.println("c=" + c);
	}

}
